home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #14
/
Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO
/
math
/
maca_101.zip
/
INTEG.DEM
< prev
next >
Wrap
Text File
|
1996-01-30
|
1KB
|
38 lines
;INTEG.DEM
;DEMO FILE FOR MASSCALC VERSION 1.00
;WRITTEN BY: Ralph W. Reid
;This file may only be distributed in its unmodified form.
;
;DESCRIPTION: This file primarily demonstrates integral calculations.
;
;For the latest releases of MASSCALC and other software created by
;Ralph W. Reid, see http://www2.athenon.com/~rreid/products/00-index.html.
;
;HOW TO USE THIS FILE: This file may be piped into MASSCALC, and its
;output displayed as follows:
;TYPE INTEG.DEM | MASSCALC | MORE
;This file may be redirected into MASSCALC and its output displayed
;as follows:
;MASSCALC < INTEG.DEM | MORE
;These two commands should be run from the operating system prompt.
;calculate the integral of an equation
;integ_a_simpson parameters are variable name, low, high, function
print: "Integral of 2*x from 0 through 2:" integ_a_simpson (x, 0, 2, 2*x);
;calculate the same equation using a list
create array: list (1, 3);
list = 0, 2, 4;
print:
print: "Finding integral with list:" list
print: "Integral =" integ_list (1, list);
;calculate the area under a horizontal line
redimension array: list [1, 4];
list = 2, 2, 2, 2;
print:
print: "Finding the integral under a horizontal line:"
print: "The initial list is " list
print: "The integral of this list is" integ_list (1, list)